<script setup lang="ts">
import { ref, onMounted } from "vue";
import { Document } from "postcss";
onMounted(() => {
  setApiKey();
});
const setApiKey = () => {
  // 获取后端正在使用的 api
  const api_key = "sk-x5QuIhKPDjFpjVrpdCXNvmbPdDGBmiSklJO9dAeMVwqGtWPi";

  // 将 api_key 复制到剪切板
  navigator.clipboard
    .writeText(api_key)
    .then(() => {
      console.log("API Key 已成功复制到剪切板!");
    })
    .catch((err) => {
      console.error("复制到剪切板失败:", err);
    });
};
</script>

<template>
  <div class="iframe-container">
    <iframe src="https://key.nika-public.com" frameborder="0" allowfullscreen>
    </iframe>
  </div>
</template>

<style scoped>
.iframe-container {
  width: 100%;
  height: 100vh; /* 使 iframe 占据整个视口高度 */
  overflow: hidden; /* 隐藏滚动条 */
}

iframe {
  width: 100%;
  height: 100%;
  border: none; /* 移除 iframe 的边框 */
}
</style>
